package com.danbay.cloud.device.entity.electricmeter;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 电表用电明细
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_em_consumption")
public class EmConsumption {

    /**
     *用电时间，精确到小时，和deviceId组成表的联合主键
     */
    @TableId
    private Long consumptionTime;

    /**
     *电表信息表（tb_em_info）的主键，和consumptionTime组成本表的主键
     */
    @TableId
    private String deviceId;

    /**
     *消费电量，从tb_em_record当前读数减去上一小时第一个读数得来
     */
    private Double consumption;

    private Date addTime;
}
